<?php
require_once APP.'/application/models/Alllist.php';

$alllist = new Alllist(Mysql::getInstance());

global $cfg;
// 超级管理员
$menu = array();
$menu['系统管理'] = array (
                          '添加管理员' => array ('controller' => 'privilege', 'action' => 'adminadd'),
                          '管理员列表' => array ('controller' => 'privilege', 'action' => 'adminmanage'),
                        );

$menu['关于论坛'] = array (
      '分类添加' => array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['gylt']),
      '分类管理' => array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type='  . $cfg['listtype']['gylt']),
      '添加' => array ('controller' => 'article', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['gylt']),
      '列表管理' => array ('controller' => 'article', 'action' => 'list', 'param' => 'type='  . $cfg['listtype']['gylt']),
);

$menu['图片新闻'] = array (
      '添加' => array ('controller' => 'news', 'action' => 'add', 'param' => 'cid=' . $cfg['listtype']['tpxw']),
      '列表管理' => array ('controller' => 'news', 'action' => 'list', 'param' => 'cid='  . $cfg['listtype']['tpxw']),
);

$menu['新闻中心'] = array (
      '分类添加' => array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['xwzx']),
      '分类管理' => array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type='  . $cfg['listtype']['xwzx']),
);
$menu['新闻中心']['专题报道-分类添加'] = array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['mtbd']);
$menu['新闻中心']['专题报道-分类管理'] = array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type='  . $cfg['listtype']['mtbd']);

$arr = $alllist->getAllListByType($cfg['listtype']['xwzx']);
foreach ($arr as $v){
	$menu['新闻中心'][$v['name'] . '-添加'] = array ('controller' => 'news', 'action' => 'add', 'param' => 'cid=' . $v['id']);
	$menu['新闻中心'][$v['name'] . '-列表查看'] = array ('controller' => 'news', 'action' => 'list', 'param' => 'cid=' . $v['id']);
}

$menu['学术活动'] = array (
      '分类添加' => array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['xshd']),
      '分类管理' => array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type='  . $cfg['listtype']['xshd']),
      '添加' => array ('controller' => 'article', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['xshd']),
      '列表管理' => array ('controller' => 'article', 'action' => 'list', 'param' => 'type='  . $cfg['listtype']['xshd']),
);
    
$menu['论坛人物'] = array (
      '分类添加' => array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['ltrw']),
      '分类管理' => array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type='  . $cfg['listtype']['ltrw']),
      '添加' => array ('controller' => 'article', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['ltrw']),
      '列表管理' => array ('controller' => 'article', 'action' => 'list', 'param' => 'type='  . $cfg['listtype']['ltrw']),
);

$menu['出版物'] = array (
    '分类添加' => array ('controller' => 'alllist', 'action' => 'add', 'param' => 'type=' . $cfg['listtype']['publication']),
    '分类管理' => array ('controller' => 'alllist', 'action' => 'manage', 'param' => 'type=' . $cfg['listtype']['publication']),
    '添加' => array ('controller' => 'publication', 'action' => 'add', 'param' => 'type=study'),
    '列表查看' => array ('controller' => 'publication', 'action' => 'list', 'param' =>'type=study'),
);

$menu['影像资源'] = array (
	'添加视频' => array ('controller' => 'video', 'action' => 'add'),
	'视频列表' => array ('controller' => 'video', 'action' => 'list'),
	'添加图片' => array ('controller' => 'image', 'action' => 'add'),
	'图片列表' => array ('controller' => 'image', 'action' => 'list'),
);


$menu['通知公告'] = array ();
$menu['通知公告']['添加'] = array ('controller' => 'news', 'action' => 'add', 'param' => 'cid=' . $cfg['listtype']['tzgg']);
$menu['通知公告']['列表查看'] = array ('controller' => 'news', 'action' => 'list', 'param' => 'cid='  . $cfg['listtype']['tzgg']);

$menu['友情链接'] = array (
		'添加' => array ('controller' => 'link', 'action' => 'add'),
		'列表查看' => array ('controller' => 'link', 'action' => 'list'),
);
$menu['会议注册系统'] = array (
  '设置' => array ('controller' => 'link', 'action' => 'set'),
);
$menu['漂浮图片'] = array (
  '设置' => array ('controller' => 'link', 'action' => 'image'),
);